package com.nashuju.web.controller.sw;

import org.durcframework.core.GridResult;
import org.durcframework.core.MessageResult;
import org.durcframework.core.controller.CrudController;
import com.nashuju.web.entity.sw.SUserLocation;
import com.nashuju.web.entity.sw.SUserLocationSch;
import com.nashuju.web.service.sw.SUserLocationService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class SUserLocationController extends
		CrudController<SUserLocation, SUserLocationService> {

		//新增记录
	@RequestMapping("/addSUserLocation.do")
	public @ResponseBody
	MessageResult addSUserLocation(SUserLocation entity) {
		return this.save(entity);
	}

	//删除记录
	@RequestMapping("/delSUserLocation.do")
	public @ResponseBody
	MessageResult delSUserLocation(SUserLocation entity) {
		return this.delete(entity);
	}
	
	//修改记录
	@RequestMapping("/updateSUserLocation.do")
	public @ResponseBody
	MessageResult updateSUserLocation(SUserLocation entity) {
		return this.update(entity);
	}

	//条件查询分页操作
	@RequestMapping("/listSUserLocation.do")
	public @ResponseBody
	GridResult listSUserLocation(SUserLocationSch searchEntitySch) {
		return this.query(searchEntitySch);
	}

	
	//条件查询并返回所有记录
	@RequestMapping("/listAllSUserLocation.do")
    public @ResponseBody Object listAllSUserLocation(SUserLocationSch searchEntitySch) {
        return this.queryAll(searchEntitySch);
    }

    //获取详细信息
	@RequestMapping("/getSUserLocationById.do")
    public @ResponseBody SUserLocation getSUserLocationById(SUserLocation entity) {
        return this.getService().get(entity.getId());
    }

 	

}